<?php
namespace Events\model;

class Event
{
   public $ID;
   public $DATE;
   public $TITLE;
   public $SUBJECT;
   public $CATEGORY;
   public $SESSIONS;
   public $SEATS;
   public $PLACE;
   public $DESCRIPTION;
   public $EVENT_STATUS;
   /*update data*/
 /*  public $INSERT_USER_ID;
   public $UPDATE_USER_ID;
   public $INSERT_DATETIME;
   public $UPDATE_DATETIME;
   public $STATUS;
  */ 
   
   public function exchangeArray($data)
   {
       $this->ID=(!empty($data['ID'])) ? $data['ID'] : null;
       $this->DATE=(!empty($data['DATE'])) ? $data['DATE'] : null;
       $this->TITLE=(!empty($data['TITLE'])) ? $data['TITLE'] : null;
       $this->SUBJECT=(!empty($data['SUBJECT'])) ? $data['SUBJECT'] : null;
       $this->CATEGORY=(!empty($data['CATEGORY'])) ? $data['CATEGORY'] : null;
       $this->SESSIONS=(!empty($data['SESSIONS'])) ? $data['SESSIONS'] : null;
       $this->SEATS=(!empty($data['SEATS'])) ? $data['SEATS'] : 0;
       $this->PLACE=(!empty($data['PLACE'])) ? $data['PLACE'] : null;
       $this->DESCRIPTION=(!empty($data['DESCRIPTION'])) ? $data['DESCRIPTION'] : null;
       $this->EVENT_STATUS=(!empty($data['EVENT_STATUS'])) ? $data['EVENT_STATUS']  : null;
       
 /*    $this->INSERT_USER_ID=(!empty($data['INSERT_USER_ID'])) ? $data['INSERT_USER_ID'] : null;
       $this->UPDATE_USER_ID=(!empty($data['UPDATE_USER_ID'])) ? $data['UPDATE_USER_ID'] : null;
       $this->INSERT_DATETIME=(!empty($data['INSERT_DATETIME'])) ? $data['INSERT_DATETIME'] : null;
       $this->UPDATE_DATETIME=(!empty($data['UPDATE_DATETIME'])) ? $data['UPDATE_DATETIME'] : null;
       $this->STATUS=(!empty($data['STATUS'])) ? $data['STATUS'] : 1; //active=1 // inactive=0
  */     
   }
   
   public function getArrayCopy()
   {
       return get_object_vars($this);
   }
}

?>